package com.class05.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2023/11/30 14:35
 */
@Controller
public class HelloController {
    //handler -> springmvc/hello -> hello springmvc
    //对外访问地址  到handlerMapping注册的注解
    @RequestMapping("springmvc/hello")
    @ResponseBody//直接返回字符串给前端，不要找视图解析器！！！！
    public String hello(){
        System.out.println("HelloController.hello");
//        返回给前端
        return "hello springmvc";
    }
}
